  <% @page_heading = "Comments for #{ link_to @article.title, :controller => 'content', :action => 'show', :id => @article }" %>

  <% content_for('tasks') do %>
    <li><%= link_to 'Back to articles', :controller => 'content', :action => 'list' %></li>
    <%= task_new('Create new comment') %>
  <% end %> 

  <div class="list">	
    <table>
    <tr>
      <th>Author</th>
      <th>Body</th>
      <th>IP</th>
      <th>Posted date</th>
      <th>Edit</th>
      <th>Delete</th>
    </tr>
    <% for comment in @comments -%>
    <tr>
      <td class="field"><%= image_tag 'checked.gif' %> <%=h comment.author %></td>
      <td class="field"><%=link_to truncate(strip_html(comment.body)), :action => 'show', :id => comment.id %> <%= comment_url_link image_tag('go'), comment %></td>
      <td class="field"><%=h comment.ip %></td>
      <td class="field"><%=h distance_of_time_in_words_to_now(comment.created_at) %></td>
      <td class="operation"><%= link_to_edit comment %></td>
      <td class="operation"><%= link_to_destroy comment %></td>    
    </tr>  
    <% end -%>
    </table>
  </div>